set(LIBRARY_OUTPUT_PATH "${Xern_BINARY_DIR}/dist/plugins")

# Build physics plugin.
add_subdirectory(BulletPhysics)

# Build rendering plugins.
add_subdirectory(OgreRenderer)

# Build sound engine plugins.
add_subdirectory(OpenALSound)

# Build input plugins.
add_subdirectory(OISInput)

# Build the sqlite based resource cache.
add_subdirectory(SqliteCache)

# Build scripting engine plugins.
add_subdirectory(SquirrelScript)

# Build the metaverse protocol, only if xml-rpc has been found.
if(XMLRPC_FOUND)
add_subdirectory(MetaverseProtocol)
endif()

# Build GUI plugins
add_subdirectory(MyGUISystem)
add_subdirectory(MyGUISquirrel)

# Build the server module
add_subdirectory(ServerModule)

# Build the client module
add_subdirectory(ClientModule)

# Build the xern protocol
add_subdirectory(XernProtocol)

# Build the ogg vorbis loader.
if(OGG_FOUND AND VORBIS_FOUND AND VORBISFILE_FOUND)
	add_subdirectory(VorbisLoader)
endif()

# Build the openJpeg loader.
if(OPENJPEG_FOUND)
	add_subdirectory(OpenJpegLoader)
endif()

# Build the Pure Data loader.
add_subdirectory(PdLoader)

# Build the wav loader.
add_subdirectory(WavLoader)
